﻿@model IEnumerable<HRWEB.TEmployee>
@using HRWEB.HtmlHelpers
<script type="text/javascript">
    jQuery(document).ready(function () {
        $('#emplist').dataTable({ "bPaginate": false,
            "bFilter": false,
            "bSort": true,
            "bInfo": false,
            "bAutoWidth": false,
            "bStateSave": true,
            "fnDrawCallback": function (oSettings) {
                $(".detail-table tr").each(function (i) {
                    $(this).hover(function () {
                        $(this).addClass('color3');
                    }, function () {
                        $(this).removeClass('color3');
                    });
                    if ($(this).hasClass('color1')) {
                        $(this).removeClass('color1');
                    }
                    if ($(this).hasClass('color2')) {
                        $(this).removeClass('color2');
                    }
                    if (i % 2) { $(this).addClass('color1'); }
                    else { $(this).addClass('color2'); }
                });
            }
        });
    });
</script>

@{Html.BeginForm();}
<label>档案号</label>@Html.TextBox("id",null,new { style = "width:60px" })<label>姓名拼音首字母</label>@Html.TextBox("inputCode",null, new { style = "width:80px" })  姓名 @Html.TextBox("name", null, new { style = "width:80px" }) 科室拼音首字母 @Html.TextBox("dinput", null, new { style = "width:80px",onChange="this.form.submit();" })@Html.DropDownList("code",DropDownListHelper.DeptListItem((string)ViewBag.InputDeptCode,""))<input type="submit" value="查询" tabindex="1" />
@{Html.EndForm();}
<table class="detail-table" id="emplist">
<thead>
@Html.GetTableRow(new string[] { "姓名", "档案号", "工作编码","性别","入院时间", "科室", "查看" })
</thead>
<tbody>
@foreach (var it in Model)
{
    <tr><td>@it.FName</td><td>@it.FEmployeeID</td><td>@it.FPublicID</td><td>@Html.FormatTDict(it.TDictGender)</td><td>@Html.FormatDateShort(it.FIntoHisDate)</td><td>@it.GetDeptName()</td><td><a href="@Url.Action("ViewEmployee",new { id= @it.FEmployeeID})">查看</a> </td></tr>
    
}
</tbody>
</table>